﻿using System;
using SBT;
using Sys;
using System.Silverlight.Presentation;
using System.Silverlight;
using System.DHTML;

namespace Scripts01
{
    public class ButtonsMgr : SLManager
    {
        public ButtonsMgr(DOMElement host)
            : base(host)
        { }
        public override void OnSilverlightLoaded(SilverlightControl slControl, object args)
        {
            Button btnOk = new Button();
            btnOk.Plugin = Plugin;
            btnOk.Element = (UIElement)Plugin.Content.FindName("buttonOk");
            btnOk.add_click((Sys.EventHandler)delegate
            {
                Script.Alert("Ok");
            });
            btnOk.Initialize();
            Button btnCancel = new Button();
            btnCancel.Plugin = Plugin;
            btnCancel.Element = (UIElement)Plugin.Content.FindName("buttonCancel");
            btnCancel.add_click((Sys.EventHandler)delegate
            {
                Script.Alert("Cancel");
            });
            btnCancel.Initialize();
        }
    }
}
